package table.inter;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import table.Col;
import table.DataTable;
import table.node.DataNode;
import table.tools.NameValues;

public interface ICol {
	/**
	 * Col Properties
	 */
	public void setProperties(NameValues properties);
	public NameValues getProperties();
	public boolean hasProperty(String name);

	/**
	 * Col Base Infomations
	 */
	public void setName(String name);
	public String getName();

	public void setDescripes(String descripes);
	public String getDescripes();
	public void setValueType(String type);
	public String getValueType() ;

	public void setDataStruct(String dataStruct);
	public String getDataStruct();
	
	/**
	 * Col Flags
	 */
	public void setFlags(String flags);
	public String getFlags();

	
	
	/**
	 * Col Data API
	 */
	
	public void addData(DataNode e);
	public void clearData();
	public int getDataSize();
	public List<DataNode> getDataList();
	
	public DataNode setNode(Object value);
	public DataNode getNode(int i);
	public Object getValue(int i);
	public Object getColValue(Object v);

	/* Col Extend API */
	public DataNode run(HttpServletRequest request);

	/* Col Base Data API */
	public boolean insert();
	public boolean modify();
	public boolean delete();
	
	/*
	 * old API
	 */
	public void setBTable(DataTable bTable);
	public DataTable getBTable();
	public void setDataByCols(List<Col> cols);
}
